/*
 * @author dumeng
 */
import request from '@/utils/request'

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}

export function queryPage(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: data.activeStatus == '1' ? '/backend/pageContainerIssue/queryPage' : '/backend/pageContainerInfo/queryPage',
    method: 'post',
    data
  })
}

export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerInfo/insert',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerInfo/update',
    method: 'post',
    data
  })
}

export function publish(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerInfo/issue',
    method: 'post',
    data
  })
}

export function unPublish(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerInfo/unissue',
    method: 'post',
    data
  })
}
export function unPublishs(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerIssue/update',
    method: 'post',
    data
  })
}
export function dels(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerIssue/deleteById',
    method: 'post',
    data
  })
}

export function get(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerInfo/query',
    method: 'post',
    data
  })
}

export function del(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerInfo/deleteById',
    method: 'post',
    data
  })
}
/**
 * 导出
 */
export function maskAPI(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerInfo/exportPageData',
    method: 'post',
    responseType: 'blob',
    data
  })
}
